<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
  <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath %>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>登录</title>
<style type="text/css" >
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{margin:0 auto;padding:0}
html{color:#000;overflow-y:scoll;overflow:-moz-scrollbars-vertical}
body,button,input,select,textarea{font-size:12px;font-family:arial,\5b8b\4f53,sans-serif}
em{font-style:normal}
small{font-size:12px}
ul,ol{list-style:none}
a{text-decoration:none}
fieldset,img{border:0}
button,input,select,textarea{font-size:100%}
table{border-collapse:collapse;border-spacing:0}
img{-ms-interpolation-mode:bicubic}
textarea{resize:vertical}.left{float:left}.right{float:right}.overflow{overflow:hidden}.hide{display:none}.block{display:block}.inline{display:inline}
.error{color:#F00;font-size:12px}
.errorbd{ border:1px #f00 dashed;}
label,button{cursor:pointer}
#u {padding: 5px 10px 3px 0; text-align: right;}
#m { margin: 0 auto; width: 974px;}
.myinput{width:125px; height:20px; background:#32a2e3; font-size:12px; border:solid 1px #0468a7; color:#ed0;}
#btntb .login{background:url(manager/images/login_09.gif) no-repeat; width:46px;height:35px}
#btntb .login:hover{background:url(manager/images/login_09_1.gif) no-repeat;}
#btntb .reset{background:url(manager/images/login_10.gif) no-repeat; width:45px;height:35px}
#btntb .reset:hover{background:url(manager/images/login_10_1.gif) no-repeat;}
</style>
<script type="text/javascript">
function check(id,obj){
	var name = id=="usertr"?"用户名":"密码";
	if(obj.value.replace(/^ +| +$/g,'')==''){
		document.getElementById(id).className="errorbd";
		//alert(name+"不能为空！");
		return true;
	}
	return false;
} 
function resetClass(id){
	document.getElementById(id).className="";
}
function login(){
  var username = document.getElementById("username");
  var psd = document.getElementById("password");
  if(check("usertr",username) && check("psdtr",psd)){
  	alert("用户名及密码不能为空！");
  	return false;
  }
  return true;
}
</script>
</head>
<body style="background:url(manager/images/login_02.gif) repeat-x; background-color:#02609c">
<p id="u"></p>
<div id="m">
	<p><img src="manager/images/login.jpg"  height="331px"/></p>
	<p>	
	<s:form action="ulogin" method="post" namespace="/manager/page" onsubmit="return login();">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
        <td width="393" height="116" background="manager/images/login_05.gif">&nbsp;</td>
        <td width="174">
		    <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="81" style="background:url(manager/images/login_06.gif) repeat-x">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr id="usertr">
                    <td width="24%"><div align="center"><font style="height:1;font-size:9pt; color:#bfdbeb;">用户</font></div></td>
                    <td width="76%" height="25">
					<input type="text" name="user.username" id="username" maxlength="10" class="myinput" onblur="check('usertr',this);" onfocus="resetClass('usertr');"/></td>
                  </tr>
                  <tr id="psdtr">
                    <td><div align="center"><font style="height:1;font-size:9pt; color:#bfdbeb;">密码</font></div></td>
                    <td height="25"><input type="password" name="user.password" id="password"  class="myinput" onblur="check('psdtr',this);" onfocus="resetClass('psdtr');"/></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="35">
					<table width="100%" border="0" cellspacing="0" cellpadding="0" id="btntb">
					  <tr>
						<td width="50" height="35"><img src="manager/images/login_08.gif" width="50" height="35"/></td>
						<td width="46"><a href="javascript:void(0)" class="login block" onclick="document.getElementById('submit').click();" >
							<input id="submit" type="submit" style="display:none"  /></a></a></td>
						<td width="45"><a href="javascript:void(0)"  class="reset block" onclick="document.getElementById('reset').click();">
							<input id="reset" type="reset" style="display:none" /></a></td>
						<td width="33"><img src="manager/images/login_11.gif" width="33" height="35"/></td>
					  </tr>
					</table>
			   </td>
              </tr>
            </table>
			</td>
            <td width="407" background="manager/images/login_07.gif">&nbsp;</td>
      </tr>
  </table>
      </s:form>
	</p>
	<p><img src="manager/images/login_12.gif"  /></p>
</div>
</body>
</html>

